01. What is the DOM?
What is the DOM?
What is the DOM?
This course isn't about HTML and CSS but they keep showing up. Why is that? HTML, CSS and JavaScript are the three components that make almost every website. As part of the process of building websites, browsers convert all of the HTML they receive into a JavaScript object called the Document Object Model (DOM).
In fact, from the console, you can examine the DOM for any website (including this one!). By examining the DOM, you can learn pretty much everything about a website.
Your Challenge
For this challenge, I want you to find out the height of the classroom window (in pixels).
To do so, you'll first need to open the console. Got it open? Select the classroom window. Try typing document.getElementsByClassName("content")[0] and press enter.
See the HTML that comes up? That's the HTML that makes up the classroom. It's actually a JavaScript object called an Element with properties you can access.
Read up on Element properties. Can you figure out the height of the classroom window? Your answer will depend on the size of your browser.
Click "Next" once you've figured out how many pixels tall your classroom window is.
INSTRUCTOR NOTE:
Follow your instructors!
@cwpittman
+jameswilliams